package com.doubao.doubao_admin.controller;

import com.doubao.doubao_admin.common.Result;
import com.doubao.doubao_admin.model.entity.BmsPromotion;
import com.doubao.doubao_admin.service.cService.BmsPromotionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/promotion")
public class BmsPromotionController {
    @Resource
    private BmsPromotionService bmsPromotionService;
    @GetMapping("/all")
    @ResponseBody
    public Result<List<BmsPromotion>> getNotices(){

        List<BmsPromotion> list = bmsPromotionService.getBmsPromotions();
        return Result.success(list);
    }
}
